<script setup lang="ts">
interface IProps {
  name: string;
  type?: 'primary' | 'default';
}

const props = withDefaults(defineProps<IProps>(), {
  name: '',
  type: 'default',
});

const typeClass = computed(() => {
  if (props.type === 'primary') {
    return 'bg-main-3 color-white';
  }
  return 'bg-gray-8 color-black-3';
});
</script>

<template>
  <view :class="['h-48 line-height-6 rounded-6rpx px-2 text-12', typeClass]">{{ name }}</view>
</template>
